/*
 * $Id: AppTecFactory.java
 * Created on 2004-12-28 13:59:24
 */
package cn.donave.framework;

import java.io.Serializable;

import cn.donave.framework.biz.service.BizControl;
import cn.donave.framework.dao.AnythingDAO;
import cn.donave.framework.exception.DoNaveException;
import cn.donave.framework.impl.DefaultDoNaveFactory;

/**
 * @author Tim Du
 * 
 */
public abstract class DoNaveFactory implements Serializable {

	private static DoNaveFactory factory = new DefaultDoNaveFactory();

	public DoNaveFactory() {
	}

	/**
	 * Set the AppTecFactory implementation to use. If no instance is set, a new
	 * DefaultAppTecFactory is used.
	 * 
	 * @param factory
	 */
	public static void setFactory(DoNaveFactory factory) {
		DoNaveFactory.factory = factory;
	}

	public static DoNaveFactory getFactory() {
		return factory;
	}

	public abstract AnythingDAO getAnythingDAO() throws DoNaveException;

	public abstract BizControl getBizControl() throws DoNaveException;

}
